﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Member.Model;
using Member.DAL;
using System.Linq.Expressions;
using Member.IDAL;
using Member.IBLL;

namespace Member.BLL
{
    public  partial class AdminBLL:BaseBLL<Admin>,IAdminBLL
    {
        private IAdminDAL admindal = new AdminDAL();
        public override void setDAl()
        {
            Dal = admindal;
        }
        /// <summary>
        /// 登陆
        /// </summary>
        /// <param name="WhereLambda"></param>
        /// <returns></returns>
        public Admin login(Expression<Func<Admin, bool>> WhereLambda)
        {
            List<Admin> list = admindal.GetModels(WhereLambda).ToList();
            if (list.Count > 0) return list.First();
            return null;
        }
    }
}
